home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.1 / card_4015.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  97 lines

  1. -- card: 4015 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 3837
  5. -- name: FileName
  6. ----- HyperTalk script -----
  7. on closecard
  8.   hide message window
  9. end closecard
  10.  
  11.  
  12.  
  13. -- part 10 (button)
  14. -- low flags: 00
  15. -- high flags: A004
  16. -- rect: left=223 top=245 right=293 bottom=283
  17. -- title width / last selected line: 0
  18. -- icon id / first selected line: 27056 / 27056
  19. -- text alignment: 1
  20. -- font id: 0
  21. -- text size: 12
  22. -- style flags: 0
  23. -- line height: 16
  24. -- part name: Try it
  25. ----- HyperTalk script -----
  26. on mouseUp
  27.   if the optionkey is down then pass mouseup
  28.   put "Just select a file & it will return the full pathname"
  29.   put filename()
  30. end mouseUp
  31.  
  32.  
  33.  
  34. -- part 11 (button)
  35. -- low flags: 00
  36. -- high flags: A003
  37. -- rect: left=82 top=302 right=324 bottom=182
  38. -- title width / last selected line: 0
  39. -- icon id / first selected line: 0 / 0
  40. -- text alignment: 1
  41. -- font id: 0
  42. -- text size: 12
  43. -- style flags: 0
  44. -- line height: 16
  45. -- part name: Install
  46. ----- HyperTalk script -----
  47. on mouseUp
  48.   if the optionkey is down then pass mouseup
  49.   put installres(XFCN,FileName) into it
  50.   if it is empty then play oops
  51.   else answer it
  52. end mouseUp
  53.  
  54.  
  55.  
  56. -- part contents for background part 6
  57. ----- text -----
  58.  
  59. This allows your HyperTalk scripts to request a filename via a Standard File Package dialog box.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. Thanks to:
  69. Steve Maller, Apple Computer.
  70. AppleLink: maller1 ‚Ä¢ Delphi: stevemaller ‚Ä¢ MCI Mail: smaller
  71.  
  72.  
  73. -- part contents for background part 5
  74. ----- text -----
  75. FileName
  76.  
  77. -- part contents for background part 10
  78. ----- text -----
  79. 1
  80.  
  81. -- part contents for background part 7
  82. ----- text -----
  83. Syntax:
  84.  
  85. FileName()
  86. shows all files, or
  87.  
  88. FileName("TYPE")
  89. where "TYPE" is the type of the file you want to open.
  90.  
  91. For example:
  92. FileName("APPL") will show only applications
  93.  
  94. FileName("STAK") will show only stacks.
  95.  
  96. FileName("TEXT") will show only text documents.
  97.